package cn.sdhuijin.model;

import java.io.Serializable;
import java.util.List;

import javax.persistence.CascadeType;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.ManyToMany;
import javax.persistence.OneToMany;
import javax.persistence.Table;

/**
 * @author sunp@sdhuijin.cn:
 * @version 创建时间：2015年4月29日 上午10:49:09 类说明
 */

@Entity
@Table(name = "user")
public class User extends IdEntity implements Serializable {

	private static final long serialVersionUID = 1L;

	private String name;

	private String pass;
	
	private String telephone;

	private String role;

	@ManyToMany(cascade = { CascadeType.ALL }, mappedBy = "deductionUsers", fetch = FetchType.LAZY)
	private List<Standard> deductionStandards;

	@OneToMany(cascade = { CascadeType.ALL }, mappedBy = "user", fetch = FetchType.LAZY)
	private List<Standard> standards;

	/**
	 * @return the deductionStandards
	 */
	public List<Standard> getDeductionStandards() {
		return deductionStandards;
	}

	/**
	 * @param deductionStandards
	 *            the deductionStandards to set
	 */
	public void setDeductionStandards(List<Standard> deductionStandards) {
		this.deductionStandards = deductionStandards;
	}

	/**
	 * @return the standards
	 */
	public List<Standard> getStandards() {
		return standards;
	}

	/**
	 * @param standards
	 *            the standards to set
	 */
	public void setStandards(List<Standard> standards) {
		this.standards = standards;
	}

	/**
	 * @return the name
	 */
	public String getName() {
		return name;
	}

	/**
	 * @param name
	 *            the name to set
	 */
	public void setName(String name) {
		this.name = name;
	}

	/**
	 * @return the pass
	 */
	public String getPass() {
		return pass;
	}

	/**
	 * @param pass
	 *            the pass to set
	 */
	public void setPass(String pass) {
		this.pass = pass;
	}

	/**
	 * @return the role
	 */
	public String getRole() {
		return role;
	}

	/**
	 * @param role
	 *            the role to set
	 */
	public void setRole(String role) {
		this.role = role;
	}

	/**
	 * @return the telephone
	 */
	public String getTelephone() {
		return telephone;
	}

	/**
	 * @param telephone the telephone to set
	 */
	public void setTelephone(String telephone) {
		this.telephone = telephone;
	}

	
}
